Skip to main content

Xero Integration - How It Works & Setup

Connect Mimoran Purchase Orders to your Xero organisation and every purchase order you create in Mimoran is copied to Xero as a Draft purchase order, with your supplier as the contact. Your accountant can then review it, approve it and turn it into a bill in Xero, without typing anything twice.

This page explains what is sent to Xero, when, what is not sent, and how to set it up.

How it works in 30 seconds​

  • One way: Mimoran → Xero. Mimoran sends purchase orders to Xero. Nothing is read back from Xero (bills, payments and approvals stay in Xero only).
  • Purchase orders, not bills. Each Mimoran PO becomes a purchase order in Xero with status Draft. You approve it and create the bill in Xero, as you normally would.
  • Automatic. A PO is sent when you create it, and sent again when you edit it. It usually appears in Xero within 1 to 2 minutes.
  • Suppliers become Xero contacts. The app looks for a Xero contact with exactly the same name as your supplier and creates one if there isn't one.
  • Your own Xero app. You connect with a free app you create on the Xero developer site (steps below). It takes about 10 minutes, once.

What is sent to Xero​

In MimoranIn Xero (purchase order)
PO numberOrder number
PO dateDate
Expected dateDelivery date
SupplierContact (see Suppliers and Xero contacts)
Ship to addressDelivery address
CurrencyCurrency
Each product line: product name + variantLine Description, for example Cotton T-Shirt - Blue / M
Quantity orderedLine Quantity
Cost (unit price)Line Unit price
SKULine Item, only if a Xero item with the same code exists (see Products and Xero items)
PO discountLine Disc %, the same on every line
Account Code settingLine Account, the same on every line (default 310 - Cost of Goods Sold)
-Reference: always From Mimoran PO
-Status: always Draft

Amounts are sent tax exclusive. Xero then applies the default tax rate of the account you chose in Account Code.

Example. You create PO #PO-1024 for supplier Acme Textiles, 100 × Cotton T-Shirt - Blue / M at 4.50 USD, with a 10% discount. About a minute later, Xero shows a Draft purchase order PO-1024 for contact Acme Textiles: 1 line, quantity 100, unit price 4.50, Disc 10%, account 310, currency USD, reference From Mimoran PO.

When a PO is sent​

The integration must be switched on (Enable Xero Integration) and Connected. Then a PO is sent to Xero when you:

  • Create a PO with products (manually, from a CSV, from Smart Reorder or as an auto PO).
  • Add a product to a PO.
  • Change the quantity, cost or another value on a product line.
  • Save the PO details (supplier, dates, ship to, currency, discount...).

The first time, a new purchase order is created in Xero. After that, the same Xero purchase order is updated: no duplicates.

POs created before you switched the integration on are not sent. To send one, make any small edit to it (for example save its details again).

What is not sent​

  • Receiving. Receiving stock in Mimoran doesn't change anything in Xero.
  • PO status. Marking a PO as ordered, completed, closed or canceled doesn't change the Xero purchase order. Approve, mark as billed or delete it in Xero.
  • Deleting a PO or a product line in Mimoran doesn't delete anything in Xero.
  • Tax and shipping amounts from the PO. Tax is worked out by Xero from the account's tax rate; add shipping in Xero if you need it on the bill.
  • New Xero items. The app never creates items (products) in Xero; it only links to items that already exist.
  • Anything from Xero back to Mimoran. Changes you make in Xero stay in Xero.

Suppliers and Xero contacts​

For each PO, the app searches Xero for a contact whose name is exactly the supplier's name:

  1. Found → the PO uses that contact.
  2. Not found → the app creates a new contact with the supplier's name, contact email and address (street, city, region, postcode, country) from the supplier in Mimoran.
  3. PO has no supplier → the app uses the Vendor of the first product on the PO.
  4. The contact can't be created (for example Xero rejects it) → the PO goes to a contact called Default Supplier.

Tip: if a supplier already exists in Xero, give it exactly the same name in Mimoran (same spelling, spaces and punctuation). Otherwise a second contact is created in Xero.

Products and Xero items​

  • If a product's SKU matches the Code of an item in Xero (Products and services), the PO line is linked to that item.
  • If not, the line has no item; it still has the description, quantity, unit price and account, so the purchase order is complete.
  • The app refreshes its copy of your Xero item list once a day, so an item you add in Xero today may be linked from tomorrow.

Before you start​

  • A Xero user with the Adviser or Standard role in the organisation you want to connect.
  • If you buy in other currencies, those currencies must be added in Xero (Settings → Currencies, needs a Xero plan with multi-currency). Otherwise Xero rejects POs in that currency.
  • The account code you want PO lines posted to (default 310 - Cost of Goods Sold). Find yours in Xero under Accounting → Chart of accounts.

Set up the integration​

Part 1: Create your Xero app (once)​

  1. Go to https://developer.xero.com/ and sign in with your Xero account.

    Login Xero

  2. Go to My Apps and click New app.

    Create new app

  3. Fill in the form:

    • App name: any name, for example Mimoran PO.
    • Integration type: Web app.
    • Company or application URL: your store's URL.
    • Redirect URI: exactly https://po.mimoran.com/xero/redirect (no space, no slash at the end).

    Create new app

  4. Open your new app and click Configuration. Copy the Client id, then click Generate a secret and copy the Client secret.

    Get Config

    Keep the secret somewhere safe: Xero shows it only once.

Part 2: Connect Mimoran to Xero​

  1. In Mimoran Purchase Orders, go to Settings → Integrations → Xero.

  2. Paste the Client Id and Client secret.

  3. Turn on Enable Xero Integration. Don't skip this: while it is off, no PO is sent to Xero, even when connected.

  4. In Xero Setting → Account Code, enter the account code for PO lines (leave 310 for Cost of Goods Sold).

    Settings save automatically: Saved appears next to each field.

    Config in PO

  5. Click Connect.

  6. Xero opens. Choose the organisation you want to connect and click Allow access.

    Access Xero

  7. You're taken back to Settings → Xero, with a Xero is connected! message and Connected shown above the button (which now reads Reconnect).

    Success

Part 3: Check it works​

  1. Create a small test PO with a supplier and 1 product, or edit an existing PO and save it.
  2. Wait 1 to 2 minutes.
  3. In Xero, open Purchase orders and the Draft tab. Your PO is there, with the same number as in Mimoran.

Good to know​

  • Edit in Mimoran, then approve in Xero. Each edit in Mimoran sends the PO again and overwrites the Xero purchase order (lines, dates, contact) and sets it back to Draft. Make your changes in Mimoran first, and approve in Xero when the PO is final.
  • Percentage discounts only. The PO discount is sent as a discount % on each line. If your PO uses a fixed amount discount, check the lines in Xero and correct the discount there.
  • One organisation. The app sends POs to one Xero organisation. When you click Allow access, select only the organisation you want. If your Xero app is already connected to several organisations, disconnect the others in Xero (Settings → Connected apps).
  • Connection expiry. Xero ends a connection that hasn't been used for 60 days. If you go 60 days without creating or editing a PO, click Reconnect before your next PO.

Troubleshooting​

My PO is not in Xero.

  1. In Settings → Xero, check that Enable Xero Integration is on and Connected is shown. If Connected is missing, click Connect / Reconnect.
  2. Was the PO created before you turned the integration on? Edit and save it to send it.
  3. Look at the Draft tab of Purchase orders in Xero, and search by the PO number.
  4. Is the PO in a currency that isn't added in Xero? Add the currency in Xero; the app retries the PO automatically.
  5. Still missing after 10 minutes? Contact us with the PO number; failed POs are retried automatically, and we can see the error Xero returned.

"Connected" disappeared. The connection expired or was removed in Xero (for example from Connected apps, or after the client secret was changed). Click Connect. POs waiting to be sent go to Xero once you're connected again.

Xero says the redirect URI is invalid when I click Connect. The Redirect URI in your Xero app must be exactly https://po.mimoran.com/xero/redirect. Fix it in your Xero app (Configuration), save, and click Connect again.

I see two contacts for the same supplier in Xero. The supplier's name in Mimoran is not exactly the same as the Xero contact. Rename the supplier in Mimoran to match the Xero contact; new POs will use that contact. Merge or archive the duplicate in Xero.

The PO lines have no item in Xero. The product's SKU doesn't match an item Code in Xero, or the item was added today. Lines without an item are still complete; add or rename the item in Xero if you want them linked.

The tax on the Xero PO is wrong. Tax comes from the tax rate of the account in Account Code. Change the default tax rate of that account in Xero, or use another account code.

FAQ​

Does it create bills (accounts payable) in Xero? No. It creates purchase orders. In Xero, open the purchase order and use Copy to → Bill when the supplier invoice arrives.

Does receiving stock update Xero? No. Inventory and receiving stay in Mimoran and Shopify.

Can I send my old POs to Xero? Yes, one by one: open the PO, edit it (or just save its details) and it is sent within a couple of minutes.

Why do I need to create my own Xero app? Your Xero app links your Xero organisation to Mimoran with your own credentials, so only you control the access. You can remove it at any time in Xero (Settings → Connected apps).

How do I stop the sync? Turn off Enable Xero Integration. POs you create or edit afterwards are not sent. Purchase orders already in Xero stay there.